package com.java8.pangjunjie.lambad;

public class Demo02 {

    public static void main(String[] args) {
        StudentService studentService = new StudentServiceImpl();
        studentService.show("函数接口");

        StudentService ss2 = new StudentService() {
            @Override
            public void show(String msg) {
                System.out.println("匿名内部类："+msg);
            }
        };

        ss2.show("hahah");

        StudentService ss3 = msg->System.out.println("lambda表达式："+msg);
        ss3.show("Java8新特性");
    }
}
